package com.likersai.opon.pojo.vo.req.menu;

import com.likersai.opon.pojo.entity.Menu;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 修改菜单请求
 *
 * @author sun.ye
 * @since 2022-06-09 16:59
 */
@Data
public class ModMenuReq {
    
    @ApiModelProperty(value = "菜单名称",example = "测试菜单")
    private String menuName;
    
    @ApiModelProperty(value = "菜单标题",example = "测试菜单Title")
    private String menuTitle;
    
    @ApiModelProperty(value = "图标",example = "likersai")
    private String icon;
    
    @ApiModelProperty(value = "排序",example = "likersai")
    private Integer sort;
    
    @ApiModelProperty(value = "展示类型",example = "SYN")
    private String type;
    
    public Menu toEntity () {
        Menu menu = new Menu();
        
        menu.setMenuName(this.menuName);
        menu.setMenuTitle(this.menuTitle);
        menu.setIcon(this.icon);
        menu.setSort(this.sort);
        menu.setType(this.type);
        
        return menu;
    }
}